package tag27_18_08.streams;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;

public class St06_KlassePrintWriter {

	public static void main(String[] args) throws IOException {

		System.out.println();
		System.out.print(22);
		System.out.print(new Object());
		System.out.format("%n%s%n", 1);

		StringWriter testOut = new StringWriter();
		
//		PrintWriter out = new PrintWriter("datei1");
//		PrintWriter out = new PrintWriter(new File("datei2"));
//		PrintWriter out = new PrintWriter(System.out);
		PrintWriter out = new PrintWriter(testOut );
		
		out.println();
		out.print(22);
		out.print(new Object());
		out.format("%n%s%n", 1);
		
		out.close();
		
		System.out.println("Alles aus dem StringWriter");
		System.out.println( testOut );
		
		System.out.println("Fertig!");

	}

}
